<template>

        <el-menu
                :default-active="activeIndex2"
                class="el-menu-demo"
                mode="horizontal"
                @select="handleSelect"
                background-color="#545c64"
                text-color="#fff"
                active-text-color="#ffd04b">

            <el-menu-item index="1">        <li class="el-icon-house"></li>宿舍管理系统</el-menu-item>
            <el-menu-item id="backhome" index="4">回到首页</el-menu-item>
            <el-submenu  id="backhome" index="2">
                <template slot="title">个人</template>
                <el-menu-item index="2-1">切换账户</el-menu-item>
                <el-menu-item index="2-1">个人信息</el-menu-item>
                <el-menu-item index="2-2">退出</el-menu-item>
            </el-submenu>

        </el-menu>
</template>

<script>
    export default {
        name: 'navMenu',
        data() {
            return {
                activeIndex: '1',
                activeIndex2: '1'
            };
        },
        methods: {
            handleSelect(key, keyPath) {
                console.log(key, keyPath);
            }
        }
    }
</script>
<style>
    #backhome{
        float: right;
    }
</style>

